<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>个人博客</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/assets/css/style.css" />
<script type="text/javascript">
function gotopage(currentPage){
	var pagesize=document.getElementById("pagesize").value;
	window.location.href='${pageContext.request.contextPath}/?currentPage='+currentPage+'&pageSize='+pagesize;
}
</script>
<!-- CuFon ends -->
</head>
<body>
	<div class="main">
		<div class="header" id="sky">
			<div class="header_resize">
				<div class="logo">
					<font size="5"><a
						href="${pageContext.request.contextPath}/page.jsp"><span>
								<c:if test="${!empty user}">${user.uname}的博客</c:if>
						</span></a><small><a
							href="${pageContext.request.contextPath}/login.jsp">登录/注册</a></small></font>
				</div>
				<div class="clr"></div>
				<div class="menu_nav">
					<ul>
						<li class="active"><a
							href="${pageContext.request.contextPath}/page.jsp">主页</a></li>
						<li><a href="${pageContext.request.contextPath}/blog.jsp">博客</a></li>
						<li><a href="${pageContext.request.contextPath}/about.html">关于我</a></li>
						<li class="last"><a
							href="${pageContext.request.contextPath}/contact.html">联系我</a></li>
					</ul>
					<div class="search">
						<form id="form" name="form" method="post" action="">
							<span> <input name="q" type="text" class="keywords"
								id="textfield" maxlength="50" value="搜索......" />
							</span> <input name="b" type="image"
								src="${pageContext.request.contextPath}/assets/images/search.gif"
								class="button" />
						</form>
					</div>
					<!--/search -->
				</div>
				<div class="clr"></div>
			</div>
		</div>

		<div class="clr"></div>
		<div class="content">
			<div class="content_resize">
				<div class="mainbar">
					<c:forEach var="c" items="${requestScope.pagebean.list}">
						<div class="article">
							<a href="${pageContext.request.contextPath}/index.html"
								style="font-size: 20px; font-weight: 800"><span>${c.btittle}</span></a>
							<div class="clr"></div>
							<p>${c.btime}作者</p>
							<a href="${pageContext.request.contextPath}/index.html"><img
								src="${pageContext.request.contextPath}/assets/images/blogimages/${c.bphoto}"
								width="613" height="193" alt="image" /></a>
							<div class="clr"></div>
							${fn:substring(c.bcontent,0,150)}... ...
							<p>
								<a href="${pageContext.request.contextPath}">Read more </a>
							</p>
						</div>
					</c:forEach>
					<div class="article"
						style="padding: 5px 20px 2px 20px; background: none; border: 0;">
						共[${pagebean.totalRecord}]条记录,每页<input type="text" id="pagesize"
							value="${pagebean.pageSize}" style="width: 25px" maxlength="2"
							onchange="gotopage(${pagebean.currentPage})" />条,共[${pagebean.totalPage}]页,
						当前[${pagebean.currentPage}]页 &nbsp;&nbsp;&nbsp; <a
							href="javascript:void(0)"
							onclick="gotopage(${pagebean.previousPage})">上一页</a>
						<c:forEach var="pagenum" items="${pagebean.pageBar}">
							<c:if test="${pagenum==pagebean.currentPage}">
								<font>${pagenum}</font>
							</c:if>
							<c:if test="${pagenum!=pagebean.currentPage}">
								<a href="javascript:void(0)" onclick="gotopage(${pagenum})">${pagenum}</a>
							</c:if>
						</c:forEach>
						<a href="javascript:void(0)"
							onclick="gotopage(${pagebean.nextPage})">下一页</a> <input
							type="text" id="pagesize" maxlength="2" style="width: 25px"></input>
						<input type="button" value="GO!" style="width: 40px"
							onclick="gotopage(document.getElementById('pagesize').vlaue)"></input>
					</div>
				</div>
				<div class="sidebar">
					<div class="gadget">
						<span style="font-size: 15px; font-weight: 800">标签分类</span>
						<div class="clr"></div>
						<ul class="sb_menu">
							<li><a href="#">java</a></li>
						</ul>
					</div>
					<div class="gadget">
						<span style="font-size: 15px; font-weight: 800">热门帖子</span>
						<div class="clr"></div>
						<ul class="ex_menu">
							<li><a href="#" title="Website Templates">标题</a><br /> 文章概述</li>
						</ul>
					</div>
					<div class="gadget">
						<span style="font-size: 15px; font-weight: 800">个性签名</span>
						<div class="clr"></div>
						<p>
							<img
								src="${pageContext.request.contextPath}/assets/images/test_1.gif"
								alt="image" width="18" height="17" /> <em>每天进步一点点 </em>.<img
								src="${pageContext.request.contextPath}/assets/images/test_2.gif"
								alt="image" width="18" height="17" />
						</p>
						<p style="float: right">
							<strong>-王</strong>
						</p>
					</div>
				</div>
				<div class="clr"></div>
			</div>
		</div>
		<div class="fbg">
			<div class="fbg_resize">
				<div class="col c1">
					<span style="font-size: 15px; font-weight: 800">相册</span> <br /> <a
						href="#"><img
						src="${pageContext.request.contextPath}/assets/images/gallery_1.jpg"
						width="58" height="58" alt="pix" /></a> <a href="#"><img
						src="${pageContext.request.contextPath}/assets/images/gallery_2.jpg"
						width="58" height="58" alt="pix" /></a> <a href="#"><img
						src="${pageContext.request.contextPath}/assets/images/gallery_3.jpg"
						width="58" height="58" alt="pix" /></a> <a href="#"><img
						src="${pageContext.request.contextPath}/assets/images/gallery_4.jpg"
						width="58" height="58" alt="pix" /></a> <a href="#"><img
						src="${pageContext.request.contextPath}/assets/images/gallery_5.jpg"
						width="58" height="58" alt="pix" /></a> <a href="#"><img
						src="${pageContext.request.contextPath}/assets/images/gallery_6.jpg"
						width="58" height="58" alt="pix" /></a>
				</div>
				<div class="col c2">
					<span style="font-size: 15px; font-weight: 800">自己想说的话</span>
					<p>
						Lorem ipsum dolor<br /> Lorem ipsum dolor sit amet, consectetuer
						adipiscing elit. Donec libero. Suspendisse bibendum. Cras id urna.
						Morbi tincidunt, orci ac convallis aliquam, lectus turpis varius
						lorem, eu posuere nunc justo tempus leo. Donec mattis, purus nec
						placerat bibendum, dui pede condimentum odio, ac blandit ante orci
						ut diam.
					</p>
				</div>
				<div class="col c3">
					<span style="font-size: 15px; font-weight: 800">联系方式</span>
					<p>
						Nullam quam lorem, tristique non vestibulum nec, consectetur in
						risus. Aliquam a quam vel leo gravida gravida eu porttitor dui.
						Nulla pharetra, mauris vitae interdum dignissim, justo nunc
						suscipit ipsum. <a href="#">mail@example.com</a><br /> <a
							href="#">+1 (123) 444-5677</a>
					</p>
				</div>
				<div class="clr"></div>
			</div>
			<div class="footer">
				<p class="lr">
					© Copyright <a href="#">我的博客</a>.
				</p>
				<p class="lf">
					Collect from: <a href="" title="网站模板" target="_blank">网站模板</a>
				</p>
				<div class="clr"></div>
			</div>
		</div>
	</div>
	<script type="text/javascript"
		src="${pageContext.request.contextPath}/assets/js/jquery.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath}/assets/js/jquery.jqlouds.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath}/assets/js/cufon-yui.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath}/assets/js/arial.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath}/assets/js/cuf_run.js"></script>
	<script>
		jQuery(function($) {
			$('#sky').jQlouds({
				wind : true
			});
		});
	</script>
</body>
</html>